<?php
session_start();
require_once 'config'.DIRECTORY_SEPARATOR.'path.php';
require_once 'config'.DIRECTORY_SEPARATOR.'bootstrap.php';

$uri		= \Foxframe\Uri::getInstance()->getUri();
$controller	= '\\App\\'.$uri->get('application').'\Controller\\'.$uri->get('controller').'Controller';
$instancia	= new $controller();
$instancia->{$uri->get('method')}($uri->get('params'));
$instancia->getView()->render();

//zerando o flashMessage (talvez aqui não seja o melhor lugar pra colocar isso
unset($_SESSION[$uri->get('application')]['flashMessage']);
